home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The Best of MacTutor - S…e Code for Volumes 1 to 5
/
The Best of MacTutor - Source Code for Volume 1-5 (Wayzata Technology)(6031)(1990).bin
/
Source Code
/
#43 (Apr 89)
/
Designer CDEF Code
/
AboutDialog.Pas
next >
Wrap
Pascal/Delphi Source File
|
1989-01-06
|
2KB
|
48 lines
UNIT AboutDialog;
{File name:AboutDialog.Pas }
{Function: Handle a dialog}
{History: 12/19/88 Original by Prototyper. }
{ Modified 1/6/89 }
INTERFACE
PROCEDURE D_AboutDialog;
IMPLEMENTATION
CONST {These are the item numbers for controls in the Dialog}
I_OK = 1;
VAR
ExitDialog : boolean; {Flag used to exit the Dialog}
PROCEDURE D_AboutDialog;
VAR
GetSelection : DialogPtr; {Name of dialog}
itemHit : Integer; {Get selection}
BEGIN {Start of dialog handler}
GetSelection := GetNewDialog(2, NIL, Pointer(-1)); {Bring in the dialog resource}
ShowWindow(GetSelection); {Open a dialog box}
SelectWindow(GetSelection); {Lets see it}
SetPort(GetSelection); {Perpare to add conditional text}
ExitDialog := FALSE; {Do not exit dialog handle loop yet}
REPEAT {Start of dialog handle loop}
ModalDialog(NIL, itemHit); {Wait until an item is hit}
{Handle it real time}
IF (ItemHit = I_OK) THEN {Handle the Button being pressed}
BEGIN
ExitDialog := TRUE; {Exit the dialog when this selection is made}
END; {End for this item selected}
UNTIL ExitDialog; {Handle dialog items until exit selected}
DisposDialog(GetSelection); {Flush the dialog out of memory}
END; {End of procedure}
END. {End of unit}